import * as req from '@/request';

export async function registStat(
  params?: { [key: string]: any },
  sorter?: { [key: string]: any },
  filter?: { [key: string]: any },
) {
  return req.postForm<API.RegistStatList>(
    '/report/registStat',
    params,
    sorter,
    filter,
  );
}

export async function activeStat(
  params?: { [key: string]: any },
  sorter?: { [key: string]: any },
  filter?: { [key: string]: any },
) {
  return req.postForm<API.ActiveStatList>(
    '/report/activeStat',
    params,
    sorter,
    filter,
  );
}

export async function retainStat(
  params?: { [key: string]: any },
  sorter?: { [key: string]: any },
  filter?: { [key: string]: any },
) {
  // console.log(params);
  return req.postForm<API.RetainStatList>(
    '/report/retainStat',
    params,
    sorter,
    filter,
  );
}

export async function saleStat(
  params?: { [key: string]: any },
  sorter?: { [key: string]: any },
  filter?: { [key: string]: any },
) {
  // console.log(params);
  return req.postForm<API.StatSaleList>(
    '/report/saleStat',
    params,
    sorter,
    filter,
  );
}


export async function onlineIpStat(
  params?: { [key: string]: any },
  sorter?: { [key: string]: any },
  filter?: { [key: string]: any },
) {
  return req.postForm<API.VpnServerOnlineIpList>(
    '/report/OnlineIpStat',
    params,
    sorter,
    filter,
  );
}


export async function onlineIpStatList(
  params?: { [key: string]: any },
  sorter?: { [key: string]: any },
  filter?: { [key: string]: any },
) {
  return req.postForm<API.IpOnlineStatList>(
    '/report/OnlineIpStatList',
    params,
    sorter,
    filter,
  );
}


// export async function userStatChart(
// ) {
//   return req.postForm<API.UserStatChartData>(
//     '/report/userStatChartData'
//   );
// }
